package com.lbd.system.controller;

import com.lbd.system.bean.BindCard;
import com.lbd.system.service.BindCardService;
import com.lbd.base.controller.BaseController;
import com.lbd.commons.Result;
import com.lbd.commons.ResultState;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/bindcard")
public class BindCardController extends BaseController {
    private final Logger log = Logger.getLogger(this.getClass());

    @Autowired
    private BindCardService bindcardService;

    /**
     * 按条件分页查询bindcard
     *
     * @param page     第几页
     * @param rows     一页多少条
     * @param bindcard
     * @return
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Result list(int page, int rows, BindCard bindcard) {
        return new Result(ResultState.SUCCESS, "查询成功", bindcardService.findByPageConditionJpql(page, rows, bindcard));
    }


}
